﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Catering.Catering_Page.richang
{
    public partial class Upload : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpPostedFile file = Request.Files["FileData"];

            string uploadpath = Server.MapPath(Request["folder"] + "\\");

            if (file != null)
            {
                if (!Directory.Exists(uploadpath))
                {
                    Directory.CreateDirectory(uploadpath);
                }
                try
                {
                    file.SaveAs(uploadpath + file.FileName);
                }
                catch (Exception ee)
                {

                }
                Response.Write("true");
            }
            else
            {
                Response.Write("false");
            }
        }

    }
}